package com.cy.store.service;

import com.cy.store.entity.Address;

import java.util.List;

/**
 * 收货地址业务层接口
 */
public interface IAddressService {
    /**
     * 增加新地址
     *
     * @param uid
     * @param username
     * @param address
     */
    void addNewAddress(Integer uid, String username, Address address);

    /**
     * 根据id获取address
     *
     * @param uid
     * @return
     */
    List<Address> getByUid(Integer uid);

    /**
     * 设置默认地址
     *
     * @param aid
     * @param uid
     * @param username
     */
    void setDefault(Integer aid, Integer uid, String username);

    /**
     * 删除用户中的收货地址数据
     *
     * @param aid
     * @param uid
     * @param username
     */
    void delete(Integer aid, Integer uid, String username);

    /**
     * 获取地址
     *
     * @param aid
     * @return
     */
    Address getByAid(Integer aid, Integer uid);
}
